﻿using Newtonsoft.Json;
using System;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.WebAPI.Models.Result.Data
{
    public class RecordData
    {
        /// <summary>
        /// 行号
        /// </summary>
        [JsonProperty("rowIndex"), JsonPropertyName("rowIndex")]
        public long rowIndex { get; set; }
        
        /// <summary>
        /// 主键ID
        /// </summary>
        [JsonProperty("id"), JsonPropertyName("id")]
        public long Id { get; set; }

        /// <summary>
        /// 分组Id
        /// </summary>
        [JsonProperty("group_id"), JsonPropertyName("group_id")]
        public long GroupId { get; set; }

        /// <summary>
        /// 数据组Id
        /// </summary>
        [JsonProperty("site_id"), JsonPropertyName("site_id")]
        public long SiteId { get; set; }

        /// <summary>
        /// 数据组名称
        /// </summary>
        [JsonProperty("site_name"), JsonPropertyName("site_name")]
        public string SiteName { get; set; }

        /// <summary>
        /// 标签Id
        /// </summary>
        [JsonProperty("tag_id"), JsonPropertyName("tag_id")]
        public long TagId { get; set; }

        /// <summary>
        /// 标签名称
        /// </summary>
        [JsonProperty("tag_name"), JsonPropertyName("tag_name")]
        public string TagName { get; set; }

        /// <summary>
        /// 标签类型名称
        /// </summary>
        [JsonProperty("tagtype_name"), JsonPropertyName("tagtype_name")]
        public string TagTypeName { get; set; }

        /// <summary>
        /// 数据值
        /// </summary>
        [JsonProperty("data_value"), JsonPropertyName("data_value")]
        public double DataValue { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [JsonProperty("update_time"), JsonPropertyName("update_time")]
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [JsonProperty("update_timestr"), JsonPropertyName("update_timestr")]
        public string UpdateTimeStr { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [JsonProperty("remark"), JsonPropertyName("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 超阈值样式
        /// </summary>
        [JsonProperty("warnclass"), JsonPropertyName("warnclass")]
        public string WarnClass { get; set; }
    }
}
